Skip to content
This repository has been archived by the owner on Sep 17, 2021. It is now read-only.

Replace getter with property based API #2

Merged
merged 9 commits into from
Aug 26, 2021
Merged

Replace getter with property based API #2

merged 9 commits into from
Aug 26, 2021

Conversation

imiric
Copy link
Contributor

@imiric imiric commented Jun 25, 2021

Based on internal design discussion. Access by property is more idiomatic for JS.

Also, s/stats/info/ based on feedback in grafana/k6#1863, though we could drop Info since it's only used internally.

This depends on grafana/k6#2108 and #1 so let's not merge it before those.

I'm not quite happy with it; it could probably be optimized, and there might be some goja.Runtime mixing.

And I think @mstoykov had some thoughts on property names that should be addressed.

@imiric imiric requested review from mstoykov, codebien and na-- June 25, 2021 15:01
@imiric imiric force-pushed the feat/getters-begone branch from d0945e3 to 99d94ff Compare June 25, 2021 15:07
Based on internal design discussion. Access by property is more idiomatic for JS.

Also, s/stats/info/ based on feedback in grafana/k6#1863.
@imiric imiric force-pushed the feat/getters-begone branch from 4b540ad to a417c77 Compare August 6, 2021 15:03
pkg/execution/execution.go Outdated Show resolved Hide resolved
imiric pushed a commit that referenced this pull request Aug 12, 2021
@imiric imiric requested a review from mstoykov August 12, 2021 14:01
@imiric imiric force-pushed the feat/getters-begone branch from c4508cb to ea16909 Compare August 12, 2021 14:09
The current WIP branches depend on WIP branches of k6, so we can't build
against k6 master. This should work for all cases...
@imiric imiric force-pushed the feat/getters-begone branch from 2d2a90a to 01b22c7 Compare August 12, 2021 14:44
Ivan Mirić added 2 commits August 12, 2021 16:47
The v0.33.0 tag was moved in k6, which messed up the sum.golang.org proxy.

We can remove this after the next k6 version is released.
@imiric imiric requested a review from mstoykov August 12, 2021 15:28
pkg/execution/execution.go Outdated Show resolved Hide resolved
Comment on lines +183 to +184
"id": func() interface{} { return vuState.VUID },
"idGlobal": func() interface{} { return vuState.VUIDGlobal },

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am still of the opinion that this should be localId/instanceId and id, but this can be fixed later

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, let's leave that for a follow-up PR. There are likely others we want renamed too, and it's pretty straightforward.

Base automatically changed from feat/initial to main August 26, 2021 12:09
Copy link
Member

@na-- na-- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. We can fix the names after playing with this for a bit. And I may have messed up the dependencies with my changes in #1, but that can be fixed in main later as well... 😅

@na-- na-- merged commit 99dd96a into main Aug 26, 2021
@na-- na-- deleted the feat/getters-begone branch August 26, 2021 12:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants